<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html >
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<script type="text/javascript" src="${pageContext.request.contextPath }/res/js/jquery-1.10.2.js"></script>
		
		<link rel="stylesheet" href="${pageContext.request.contextPath }/res/css/bootstrap.min.css">
		
		<title>登录页面</title>
		
		<style type="text/css">
			#main{
				margin:0px auto; /* 居中 */
				/* border:1px solid red ; /* 边框 */
				
				
				width:300px;
			}
			
			#main ul{
				list-style:none;
				 
			}
			
			#main ul li{
				float:left;
				width:50%;
				height:50px;
			}
			
			 
		</style>
		
		<script type="text/javascript">
		
		$(function(){
			$("#empName").blur(function(){
				var url = "${pageContext.request.contextPath }/emp/validateName.action";
				var data = {empName:$(this).val()};
				
				$.post(url,data,function(mes){
					//alert(mes);
					
					$("#ts").html(mes.mes);					
					
				},"JSON");
			})
		})
		
		</script>
		
	</head>
	<body>
		<div id="main">
			<form action="${pageContext.request.contextPath }/emp/login.action" method="post">
			<ul>
				<li>用户名:</li>
				<li><input type="text" name="empName" id="empName"></li>
				<li  style="width:100%;"><span id="ts" style="color:red;"></span></li>
				<li>密码:</li>
				<li><input type="password" name="empDesc"></li>
				<li>${info }</li>
				<li style="width:100%;text-align:right;"><input type="submit" value="登录" class="btn"></li>
				
			</ul>
			</form>
		</div>
	</body>
</html>